<?php


namespace app\demo\controller;


class text
{
    public function index(){
        $name= '小明';
        $score = 88;
        if (is_int($score) || is_float($score)){
            if ($score >=90 && $score <=100){
                $score = 'A级';
            }elseif ($score >= 80 && $score < 90){
                $score = 'B级';
            }elseif ($score >= 70 && $score < 80){
                $score = 'C级';
            }elseif ($score >= 60 && $score < 70){
                $score = 'D级';
            }elseif ($score >= 50 && $score < 60){
                $score = 'E级';
            }else{
                $str = '学生成绩范围必须在0-100！';
            }
            echo $str;
        }
    }
}